//
//  MXdetailsController.m
//  Ten
//
//  Created by anfuer on 2018/8/18.
//  Copyright © 2018年 xg韦. All rights reserved.
//

#import "MXdetailsController.h"

@interface MXdetailsController ()
@property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *Lb1S;
@property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *Lb2S;
@property (weak, nonatomic) IBOutlet UILabel *lb1;
@end

@implementation MXdetailsController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSArray*typeary=@[@"资金说明",@"对方账户",@"明细分类",@"到账时间",@"订单号"];
    //支出
    NSArray*typeary2=@[@"提现说明",@"提现账户",@"明细分类",@"申请时间",@"订单号"];
    [FuncPublic getData:self parameters:@{@"id":_mid} RequestUrl:salary_record_detail success:^(NSDictionary *acountInfo) {
        NSDictionary*dict=acountInfo[@"salary_records"];
        NSArray*typeary3=@[dict[@"explain"],dict[@"account"],dict[@"type_name"],dict[@"add_time"],dict[@"order_id"]];
       
        [_Lb1S enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            UILabel*lb=obj;
            UILabel*lb2=_Lb2S[idx];
            if ([WXGStr(dict[@"type"])isEqualToString:@"2"]) {
                 lb.text=typeary2[idx];
                lb2.text=typeary3[idx];
                _lb1.text=@"提现成功";
            }else
            {
                 _lb1.text=@"薪酬转入成功";
                lb2.text=typeary3[idx];
                lb.text=typeary[idx];
            }
           
        }];
        
    }];
   //收入
   
    
  
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
